package com.gitee.wsl.compose.state.ext

import androidx.compose.runtime.Composable
import androidx.compose.runtime.compositionLocalOf
import com.gitee.wsl.compose.state.S

@Composable
fun <T> S.staticState(init:T) = compositionLocalOf { init }

@Composable
fun <T> S.staticState(init:()->T) = compositionLocalOf(defaultFactory = init)
